/**
 * @file wa_img.h
 *
 */

#ifndef _WA_IMG_H
#define _WA_IMG_H

#ifdef __cplusplus
extern "C" {
#endif

	/*********************
	*      INCLUDES
	*********************/
#include "wa_conf.h"
#if USE_WA_IMG != 0
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "wa_area.h"
#include "wa_obj.h"
#include "wa_mask_draw.h"
#include "wa_wm.h"
#include "wa_font.h"
#include "wa_image.h"	
/*********************
*      DEFINES
*********************/

#define WA_IMG_AL_LEFT         (0<<0)
#define WA_IMG_AL_RIGHT        (1<<0)
#define WA_IMG_AL_HCENTER      (2<<0)

#define WA_IMG_AL_TOP          (0<<2)
#define WA_IMG_AL_BOTTOM       (1<<2)
#define WA_IMG_AL_VCENTER      (2<<2)

/**********************
*      TYPEDEFS
**********************/

typedef struct
{
	wa_bitmap* bitmap;
	wa_image_type img_type;
	wa_gui_color img_color;
	wa_gui_color back_color;
	uint8_t align_mode;
}wa_img_ext;

/**********************
* GLOBAL PROTOTYPES
**********************/
void wa_img_module_init(void);
wa_obj* wa_img_create(wa_obj* par);
void wa_img_set_bitmap(wa_obj* img, wa_bitmap* bitmap);
void wa_img_set_img_color(wa_obj* img, wa_gui_color color);
void wa_img_set_back_color(wa_obj* img, wa_gui_color color);
void wa_img_set_align_mode(wa_obj* img, uint8_t align_mode);
wa_bitmap* wa_img_get_bitmap(wa_obj* img);
wa_gui_color wa_img_get_img_color(wa_obj* img);
wa_gui_color wa_img_get_back_color(wa_obj* img);
uint8_t wa_img_get_align_mode(wa_obj* img);

/**********************
*      MACROS
**********************/

#endif

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif

